package lwjglbase;

public class Button extends Sprite{
    String name;
    public Button(String image, String name, float x, float y) {
        initTex(LWJGLbase.SPRITES_PATH + image);
        this.x = x;
        this.y = y;
        this.xsize = tex.getImageWidth();
        this.ysize = tex.getImageHeight();
        this.name = name;
    }

    public boolean checkClicked(float mx, float my) {
        return ((mx < x+xsize) && (mx > x) && (my < y+ysize) && (my > y));
    }
}
